package com.zhangshitong.springbootModel.utils;

import java.io.IOException;

import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;

public class LongSerializer extends JsonSerializer<Long>{

	 public void serialize(Long arg0, JsonGenerator arg1, SerializerProvider arg2)
			    throws IOException, JsonProcessingException
			  {
			    arg1.writeString(String.valueOf(arg0));
			  }

			  public Class<Long> handledType()
			  {
			    return Long.class;
			  }	
}
